//
//  YXArenaController.m
//  彩票
//
//  Created by mac on 15-3-25.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "YXArenaController.h"

@interface YXArenaController ()

@end

@implementation YXArenaController

- (void)loadView
{
    UIImageView *imaView = [[UIImageView alloc] init];
    imaView.image = [UIImage imageNamed:@"NLArenaBackground"];
    self.view = imaView;
  

}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupNav];
    }

- (void)setupNav
{
    // 设置导航条背景图
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"NLArenaNavBar64"] forBarMetrics:UIBarMetricsDefault];
    // 设置选项卡
    UISegmentedControl *seg = [[UISegmentedControl alloc] initWithItems:@[@"足球", @"篮球"]];
    self.navigationItem.titleView = seg;
    // 选项卡中字体
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    dic[NSForegroundColorAttributeName] = [UIColor whiteColor];
    [seg setTitleTextAttributes:dic forState:UIControlStateSelected];
    // 设置边框颜色
    self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:18/255.0 green:144/255.0 blue:144/255.0 alpha:1];
    // 设置默认选中项
    seg.selectedSegmentIndex = 1;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
